﻿<div class="section">
    <h2>Report Summary</h2>

    <div class="small font-weight-bold">
        View as
        &nbsp; &nbsp;
        <a class="btn-link disabled font-weight-bold" href="#">HTML</a>|
        <a href="output.json">JSON</a>
    </div>
</div>

<div class="container">
    <div class="row">
        <div class="col-2">
            <ul class="nav flex-column">
				      <li class="nav-item">
					      <a class="nav-link active" href="#project_info" role="tab" data-toggle="tab">Project Info</a>
				      </li>
				      <li class="nav-item">
					      <a class="nav-link" href="#scan_metadata" role="tab" data-toggle="tab">Metadata</a>
				      </li>
              <li class="nav-item">
                <a class="nav-link" href="#sorted_uniquetags" role="tab" data-toggle="tab">Tags List</a>
              </li>
                <li class="nav-item">
                  <a class="nav-link" href="#select_tagcounters" role="tab" data-toggle="tab">Tag Counters</a>
             </li>
			      </ul>
        </div>
        <div class="col">
          <div class="tab-content">
            <div role="tabpanel" class="tab-pane active show" id="project_info">
              <h4>Project Info</h4>
              <div class="container">
                <div class="row">
                  <div class="col">
                    <div id="s_pi_analysis_chart"></div>
                  </div>
                  <div class="col">
                    <div id="s_pi_patterns_chart"></div>
                  </div>
                  <div class="col">
                    <div id="s_pi_languages_chart"></div>
                  </div>
                </div>
              </div>

              <table class="table table-sm">
                <tr>
                  <td class="font-weight-bold">Name</td>
                  <td id="s_pi_application_name"></td>
                </tr>
                <tr>
                  <td class="font-weight-bold">Version</td>
                  <td id="s_pi_version"></td>
                </tr>
                <tr>
                  <td class="font-weight-bold">Description</td>
                  <td id="s_pi_description"></td>
                </tr>
                <tr>
                  <td class="font-weight-bold">Folder</td>
                  <td id="s_pi_source_path"></td>
                </tr>
                <tr>
                  <td class="font-weight-bold">Author(s)</td>
                  <td id="s_pi_author"></td>
                </tr>
                <tr>
                  <td class="font-weight-bold">Analyzed</td>
                  <td id="s_pi_date_scanned"></td>
                </tr>
              </table>
            </div>
            <div role="tabpanel" class="tab-pane" id="scan_metadata">
              <h4>Metadata</h4>
              <div>
                Application targets or packaging detected.
              </div>
              <br>
              <br>
              <table class="table table-condensed" style="width:600px;">
                <tr>
                  <td class="font-weight-bold" style="width:300px;">Characteristic</td>
                  <td class="font-weight-bold" style="">Detected Value(s)</td>
                </tr>
                <tr>
                  <td style="width:300px;">Application Types</td>
                  <td style="">{% for item in apptypes -%}{{item}} {% endfor -%}</td>
                </tr>
                <tr>
                  <td style="width:300px;">Package Types</td>
                  <td style="">{% for item in packagetypes -%}{{item}} {% endfor -%}</td>
                </tr>
                <tr>
                  <td style="width:300px;">Output Types</td>
                  <td style="">{% for item in outputs -%}{{item}} {% endfor -%}</td>
                </tr>
                <tr>
                  <td style="width:300px;">File Types</td>
                  <td style="">{% for item in filetypes -%}<a href="https://fileinfo.com/extension/{{item}}" target="_blank" rel="noopener">{{item}}</a> {% endfor -%}</td>
                </tr>
                <tr>
                  <td style="width:300px;">OS Targets</td>
                  <td style="">{% for item in ostargets -%}{{item}} {% endfor -%}</td>
                </tr>
                <tr>
                  <td cstyle="width:300px;">CPU Targets</td>
                  <td style="">{% for item in cputargets -%}{{item}} {% endfor -%}</td>
                </tr>
              </table>
            </div>
            <div role="tabpanel" class="tab-pane" id="sorted_uniquetags">
              <h4>Tags List View</h4>
              <div>
                A complete and simple list view of the unique tags found and matching rule. Click a tag on the left then click
                the rule name link shown on the right to view the source code location of the match.  See the Features menu
                for an alternative illustration of the major features detected.
              </div>
              <br>
              <br>
              <div class="section">
                <div class="container-fluid">
                  <div class="row">
                    <div class="col">
                      <h4>Unique Tags Detected ({{tagGrpAllTagsByName.size}})</h4>
                      <div id="divtag" style="border:none;display:normal">                     
                          <div>
                            <table class="table table-condensed" style="border:none; width:400px;">
                              <tr>
                                <td>
                                  <a href="#" onclick="SortbyTags();">
                                    <strong>Rule Tag</strong>
                                  </a>
                                </td>
                                <td>
                                  <a href="#" onclick="SortbyConfidence();">
                                    <strong>Confidence</strong>
                                  </a>
                                </td>
                                <td>
                                  <a href="#" onclick="SortbySeverity();">
                                    <strong>Importance</strong>
                                  </a>
                                </td>
                              </tr>
                              <tr></tr>
                              {% for tag in tagGrpAllTagsByName -%}
                              <tr>
                                <td style="width:300px;">
                                  <a href="#" class="feature_icon" data-target="{{ tag.tag }}">{{ tag.tag }}</a>
                                </td>
                                <td style="width:100px;text-align:center">{{ tag.confidence }}</td>
                                <td>{{ tag.severity }}</td>
                              </tr>
                              {% endfor -%}
                            </table>
                          </div>
                      </div>
                      <div id="divconf" style="border:none;display:none">
                        <div>
                          <div>
                            <table class="table table-condensed" style="border:none; width:400px;">
                              <tr>
                                <td>
                                  <a href="#" onclick="SortbyTags();">
                                    <strong>Rule Tag</strong>
                                  </a>
                                </td>
                                <td>
                                  <a href="#" onclick="SortbyConfidence();">
                                    <strong>Confidence</strong>
                                  </a>
                                </td>
                                <td>
                                  <a href="#" onclick="SortbySeverity();">
                                    <strong>Importance</strong>
                                  </a>
                                </td>
                              </tr>
                              {% for tag in tagGrpAllTagsByConfidence -%}
                              <tr>
                                <td style="width:300px;">
                                  <a href="#" class="feature_icon" data-target="{{ tag.tag }}">{{ tag.tag }}</a>
                                </td>
                                <td style="width:100px;text-align:center">{{ tag.confidence }}</td>
                                <td>{{ tag.severity }}</td>
                              </tr>
                              {% endfor -%}
                            </table>
                          </div>
                        </div>
                      </div>
                      <div id="divsev" style="border:none;display:none">
                        <div>
                          <div>
                            <table class="table table-condensed" style="border:none; width:400px;">
                              <tr>
                                <td>
                                  <a href="#" onclick="SortbyTags();">
                                    <strong>Rule Tag</strong>
                                  </a>
                                </td>
                                <td>
                                  <a href="#" onclick="SortbyConfidence();">
                                    <strong>Confidence</strong>
                                  </a>
                                </td>
                                <td>
                                  <a href="#" onclick="SortbySeverity();">
                                    <strong>Importance</strong>
                                  </a>
                                </td>
                              </tr>
                              {% for tag in tagGrpAllTagsBySeverity -%}
                              <tr>
                                <td style="width:300px;">
                                  <a href="#" class="feature_icon" data-target="{{ tag.tag }}">{{ tag.tag }}</a>
                                </td>
                                <td style="width:100px;text-align:center">{{ tag.confidence }}</td>
                                <td>{{ tag.severity }}</td>
                              </tr>
                              {% endfor -%}
                            </table>
                          </div>
                        </div>
                      </div>
                    </div>
                    <div class="col">
                      <h4>Rule</h4>
                      <div id="features">
                        <table class="table table-sm table-hover">
                          <thead>
                            <tr>
                              <th style="font-size:16px;line-height:34px;">Name</th>
                            </tr>
                          </thead>
                          <tbody>
                            <tr>
                              <td>Hint: Select tag on left</td>
                            </tr>
                          </tbody>
                        </table>
                      </div>
                    </div>
                  </div>
                </div>
              </div>
            </div>
            <div role="tabpanel" class="tab-pane" id="select_tagcounters">
              <h4>Tag Counters</h4>
              <div>
                Selected set of tags for counting the number of occurrences found in the scanned source code.  These may be excluded from
                detailed matches identified in the general report yet still get "counted" as specified in preferences/tagcounters.json.
              </div>
              <br>
              <br>
              <table class="table table-condensed" style="width:600px;">
                <tr>
                  <td class="font-weight-bold" style="font-size:16px;text-align:left;">Rule Tag</td>
                  <td class="font-weight-bold" style="font-size:16px;text-align:center;">Count</td>
                  <td class="font-weight-bold" style="font-size:16px;text-align:center;">Include as Match</td>
                </tr>
                {% for counter in tagcounters -%}
                <tr>
                  <td style="font-size:16px;text-align:left;">{{counter.tag}}</td>
                  <td style="font-size:16px;text-align:center;">{{counter.count}}</td>
                  <td style="font-size:16px;text-align:center;">{{counter.include_as_match}}</td>
                </tr>
                {% endfor -%}
              </table>
            </div>
          </div> 
        </div>
    </div>
</div>



